# -*- mode: python -*-
# vi: set ft=python :

# Copyright 2020 Massachusetts Institute of Technology.
# Licensed under the BSD 3-Clause License. See LICENSE.TXT for details.

load("//htmlbook/tools/html:defs.bzl", "rt_html_test")
load("//htmlbook/tools/tidy:def.bzl", "html_tidy_test")

exports_files(
    ["LICENSE.TXT"],
    visibility = ["//visibility:public"],
)

exports_files(
    ["setup.cfg"],
    visibility = ["//:__subpackages__"],
)

filegroup(
    name = "html",
    srcs = glob([
        "*.html",
        "*.html.in",
    ]),
    visibility = ["//:__subpackages__"],
)

html_tidy_test(
    name = "html_tidy",
    srcs = [":html"],
    config = ".tidy.config",
)

rt_html_test(
    srcs = ["intro.html"],
)

rt_html_test(
    srcs = ["pend.html"],
)

rt_html_test(
    srcs = ["acrobot.html"],
)

rt_html_test(
    srcs = ["simple_legs.html"],
)


rt_html_test(
    srcs = ["humanoids.html"],
)


rt_html_test(
    srcs = ["stochastic.html"],
)

rt_html_test(
    srcs = ["dp.html"],
)

rt_html_test(
    srcs = ["lqr.html"],
)

rt_html_test(
    srcs = ["lyapunov.html"],
)

rt_html_test(
    srcs = ["trajopt.html"],
)

rt_html_test(
    srcs = ["planning.html"],
)

rt_html_test(
    srcs = ["feedback_motion_planning.html"],
)
rt_html_test(
    srcs = ["policy_search.html"],
)
rt_html_test(
    srcs = ["robust.html"],
)
rt_html_test(
    srcs = ["output_feedback.html"],
)
rt_html_test(
    srcs = ["limit_cycles.html"],
)
rt_html_test(
    srcs = ["contact.html"],
)
rt_html_test(
    srcs = ["sysid.html"],
)

rt_html_test(
    srcs = ["state_estimation.html"],
)
rt_html_test(
    srcs = ["rl_policy_search.html"],
)
rt_html_test(
    srcs = ["drake.html"],
)
rt_html_test(
    srcs = ["multibody.html"],
)
rt_html_test(
    srcs = ["optimization.html"],
)
rt_html_test(
    srcs = ["playbook.html"],
)

filegroup(
    name = "chapters",
    srcs = ["chapters.json"],
    visibility = ["//visibility:public"],
)
